import axiosInstance from "../../plugins/axios";
import { ElMessage } from "element-plus";



export const getRskInfo = async (id: string) => {
  const res = await axiosInstance.get(
    `/rsk/get?id=${id}`
  );
  if (res.data.code == 1) {
    return res.data.data; // 返回数据
  } else {
    ElMessage.error(res.data.message || "Rsk信息不存在");
    throw new Error(res.data.message || "PDR信息不存在");
  }
};

export const updateRskInfo = async (rdf: any) => {
  const res = await axiosInstance.post(
    `/rsk/update`,
	rdf
  );
  if (res.data.code == 1) {
    return res.data.data; // 返回数据
  } else {
    ElMessage.error(res.data.message || "Rsk信息不存在");
    throw new Error(res.data.message || "PDR信息不存在");
  }
};


